As an in-vehicle network, a CAN (Controller Area Network) is popular. The CAN is a serial communication protocol employing a bus type network. Messages from each node connected to a bus are broadcast to all nodes connected to the bus. The messages do not include identification information of a transmission source node and a destination node. Therefore, in a reception node, it is not possible to simply determine whether the message is a message from a correct communication partner.
In order to ensure integrity of a message and to prevent a replay attack from an unauthorized device connected to the CAN, a method using a message authentication code (MAC) is proposed. For example, there is proposed a method for generating a MAC for an ordinary message, and transmitting the message containing the MAC, each time when generating/transmitting the ordinary message (refer to PTL 1, for example).